<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>this指向</title>
</head>
<body> 
    <script> 
        function a(){
            var user = '小王八'
            console.log(this)
            console.log(this.user)
        }
        a()
    </script>
</body>
</html>